package com.portal.web.action.system.user;


import com.portal.model.ResultMessage;
import com.portal.model.system.User;
import com.portal.web.action.BaseAction;

/**
 * 用户管理修改
 * @author liu.qiao
 *
 */
public class Update extends BaseAction {
	private static final long serialVersionUID = 1L;
	private User user= new User();
	private ResultMessage result = new ResultMessage("0", "");

    public String execute() throws Exception {
    	try {
    		user.setPassword("123456");
    		this.getServiceContainer().getUserService().update(user);
		} catch (Exception e) {
			e.printStackTrace();
			setResult(new ResultMessage("100", "修改用户失败！"));
			return ERROR;
		}
		setResult(new ResultMessage("0", "修改用户成功！"));
        return SUCCESS;
    }

	public ResultMessage getResult() {
		return result;
	}

	public void setResult(ResultMessage result) {
		this.result = result;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
}
